package com.ypinkj.app.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ypinkj.app.entity.User;
import com.ypinkj.app.mapper.UserMapper;
import com.ypinkj.app.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author LF
 * @date 2020/9/29 - 11:25
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper,User> implements UserService {

  /*  @Autowired
    UserMapper userMapper;*/

    @Override
    public User findByUsername(String username) {
        return baseMapper.findByUsername(username);
    }

    @Override
    public User findUserById(String userId) {
        return baseMapper.findUserById(userId);
    }

    @Override
    public User findUserByPhone(String phone) {
        return baseMapper.findUserByPhone(phone);
    }

    @Override
    public void UpdateUserToken(User user) {
        baseMapper.UpdateUserToken(user);
    }
}
